package com.example.chasshelper.model;

import java.io.Serializable;
import java.util.Objects;

public class Student implements Serializable {
    private Integer studentId;

    private String studentAccount;

    private String studentPassword;

    private String studentPhone;

    private String studentName;//用户名

    public String getStudentName() {
        return studentName;
    }

    public void setStudentName(String studentName) {
        this.studentName = studentName;
    }

    public Integer getStudentId() {
        return studentId;
    }

    public void setStudentId(Integer studentId) {
        this.studentId = studentId;
    }

    public String getStudentAccount() {
        return studentAccount;
    }

    public void setStudentAccount(String studentAccount) {
        this.studentAccount = studentAccount;
    }

    public String getStudentPassword() {
        return studentPassword;
    }

    public void setStudentPassword(String studentPassword) {
        this.studentPassword = studentPassword;
    }

    public String getStudentPhone() {
        return studentPhone;
    }

    public void setStudentPhone(String studentPhone) {
        this.studentPhone = studentPhone;
    }

    @Override
    public String toString() {
        return "Student{" +
                "studentId=" + studentId +
                ", studentAccount='" + studentAccount + '\'' +
                ", studentPassword='" + studentPassword + '\'' +
                ", studentPhone='" + studentPhone + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Student)) return false;
        Student student = (Student) o;
        return Objects.equals(studentId, student.studentId) &&
                Objects.equals(studentAccount, student.studentAccount) &&
                Objects.equals(studentPassword, student.studentPassword) &&
                Objects.equals(studentPhone, student.studentPhone);
    }

    @Override
    public int hashCode() {
        return Objects.hash(studentId, studentAccount, studentPassword, studentPhone);
    }
}
